# 进程Process
import requests
from multiprocessing import Process
res=[]
def resqu_bilibili(index):
    url1="https://www.bilibili.com/"
    headers={
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
    }
    respon=requests.get(url=url1,headers=headers)
    res.append(respon)
    print("index is ", index, ": ", respon.status_code)


if __name__=="__main__":
    p_arr=[]
    for i in range(5):
        p=Process(target=resqu_bilibili,args=(i,))
        p_arr.append(p)
        p.start()
    for i in p_arr:
        p.join()

    print(res)

# index is  3 :  200
# index is  2 :  200
# index is  0 :  200
# index is  1 :  200
# index is  4 :  200
# []
